package com.demo4;

import com.demo4.component.StudentComponent;
import com.demo4.controller.StudentController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App4 {
    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring-config.xml");

        StudentController controller =
                context.getBean("studentController", StudentController.class);
        StudentComponent students = controller.getStudent();
        System.out.println(students.student1());
    }
}
